Skip to content

branch-4.1: [feature](paimon) implement create/drop db, create/drop table for paimon (#58894)#61338

Merged
morningman merged 2 commits into
apache:branch-4.1from
morningman:pick/paimon_create_drop_41
Mar 16, 2026
Merged

branch-4.1: [feature](paimon) implement create/drop db, create/drop table for paimon (#58894)#61338
morningman merged 2 commits into
apache:branch-4.1from
morningman:pick/paimon_create_drop_41

Conversation

@morningman

Copy link
Copy Markdown
Contributor

Cherry-pick from #58894

…mon (apache#58894)

Related apache#56005

this PR implement create/drop database creste/drop table for paimon

**1.create databse:**
create database if not exists test_db;
**2.drop databse:**
drop database if exists test_db;
**3.create table:**
   The current storage format is the default Parquet.
 **3.1 simple table:**
         CREATE TABLE test_db.test01 (
             id int
         ) engine=paimon;

 **3.2 table with primaty-key:**
       CREATE TABLE test_db.test02 (
           id int
       ) engine=paimon
       properties("primary-key"=id);

 **3.3 table with many types:**
       CREATE TABLE test_db.test03 (
                    c0 int,
                    c1 bigint,
                    c2 float,
                    c3 double,
                    c4 string,
                    c5 date,
                    c6 decimal(10,5),
                    c7 datetime
          ) engine=paimon
        properties("primary-key"=c0);

 **3.4 partition table:**
       CREATE TABLE test_db.test04 (
                    c0 int,
                    c1 bigint,
                    c2 float,
                    c3 double,
                    c4 string,
                    c5 date,
                    c6 decimal(10,5),
                    c7 datetime
         ) engine=paimon
         partition by (c1) ()
        properties("primary-key"=c0);
  **3.5 table with bucket:**
      create table test_db.test05 (
         c0  int,
         c1 bigint,
         c2 float,
         c3 double,
         c4 string,
         c5 date,
         c6 decimal(20,10),
         c7 datetime
    ) engine = paimon
    properties (
        'primary-key' = 'c0,c1',
        'bucket' = '4',
        'bucket-key' = 'c0,c1'
    );

   **Note:
       All bucket keys should be included in the primary key.**
     **All table properties will be passed to paimon.**

**4.drop table:**
  drop table if exists test_db.test01;

 **5.TODO:**
     **5.1 support ORC format when creating table**
     **5.2 support alter table and other DDL**

Co-authored-by: yaoxiao <yaoxiao@fosun.com>
@morningman morningman requested a review from yiguolei as a code owner March 14, 2026 17:35
@Thearas

Thearas commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@morningman morningman changed the title [feature](paimon) implement create/drop db, create/drop table for paimon (#58894) branch-4.1: [feature](paimon) implement create/drop db, create/drop table for paimon (#58894) Mar 14, 2026
@yiguolei

Copy link
Copy Markdown
Contributor

run buildall

@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 42.98% (101/235) 🎉
Increment coverage report
Complete coverage report

@morningman morningman merged commit e185b49 into apache:branch-4.1 Mar 16, 2026
23 of 25 checks passed
yiguolei pushed a commit that referenced this pull request Mar 16, 2026
…able for paimon (#58894) (#61338)

Cherry-pick from #58894

---------

Co-authored-by: yaoxiao <yx136264032@163.com>
Co-authored-by: yaoxiao <yaoxiao@fosun.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants